﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace DesignPattern.Factory
{
    public abstract class AbstractFactory
    {
        public static AbstractFactory GetInstance()
        {
            string factoryName = "ChineseFactory";
            AbstractFactory instance;
            if (!string.IsNullOrEmpty(factoryName))
                instance = (AbstractFactory)Assembly.Load(factoryName).CreateInstance(factoryName);
            else
                instance = null;

            return instance;

        }
        public abstract Tax CreateTax();
        public abstract Bonus CreateBonus();
    }
}
